import React from "react";
import './index.css';
import { Button } from 'antd';

export default class extends React.Component{
    constructor(props){
        super();
        this.state={
            text:props.text,
            subtext:props.subtext,
            question_num:props.question_num,
            countdown:props.countdown,
            finishExam:props.finishExam,
            parseExam:props.parseExam
        }
    }

    UNSAFE_componentWillReceiveProps(props){
        this.setState({
            text:props.text,
            subtext:props.subtext,
            question_num:props.question_num,
            countdown:props.countdown,
            finishExam:props.finishExam,
            parseExam:props.parseExam
        })
    }
    
    // 发布派单入口
    render(){
        return(
            <div className="Transaction_Body" id="TestCountDown_Body">
                <div className="TestCountdown_Top">
                    <div className="TestCountdown_Top_Right">
                        <div className="TestCountdown_Top_Text">
                            <div className="TestCountdown_Top_Title">{this.state.text}</div>
                            <div className="TestCountdown_Top_subTitle">{this.state.subtext}</div>
                        </div>
                    </div>
                    <div className="Transaction_Top_Img">
                        <img src="/assets/Trade/PublishDrone.png" alt="publish"/>
                    </div>
                </div>
                <div className="TransactionBtn" >
                    <a href="/tradeMarket/transactionSell" alt="sell" target="Layout_MainContainer">
                        <Button  style={{width:"142px"}} type="primary" shape="round"  size="large" >
                    我是卖家
                    </Button></a>
                </div>
                <div className="TransactionBtn" >
                    <a href="/tradeMarket/transaction" alt="custumer" target="Layout_MainContainer">
                        <Button  style={{width:"142px"}} type="primary" shape="round"  size="large" >
                    我是买家
                    </Button></a>
                </div>
            </div>
        )
    }
}